// eslint-disable-next-line
import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

const RouteView = {
    name: 'RouteView',
    render: (h) => h('router-view')
}

export const asyncRouterMap = [

    {
        path: '/',
        name: 'index',
        component: BasicLayout,
        meta: { title: 'menu.home' },
        redirect: '/teamMembers',
        children: [{
                path: '/teamMembers',
                name: 'teamMembers',
                component: () =>
                    import ('@/views/train/TrainMembers'),
                meta: { title: '队员名单', keepAlive: true, permission: ['table'] }
            },
            {
                path: '/trainList',
                name: 'trainList',
                component: () =>
                    import ('@/views/train/TrainList'),
                meta: { title: '训练列表', keepAlive: true, permission: ['table'] }
            },
          {
            path: '/trainDescription',
            name: 'trainDescription',
            component: () =>
              import ('@/views/train/TrainDescription'),
            meta: { title: '训练详情', keepAlive: false, permission: ['table'] }
          },


        ]
    },
    {
        path: '*',
        redirect: '/404',
        hidden: true
    }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [{
        path: '/user',
        component: UserLayout,
        redirect: '/user/login',
        hidden: true,
        children: [{
                path: 'login',
                name: 'login',
                component: () =>
                    import ( /* webpackChunkName: "user" */ '@/views/user/Login')
            },
            {
                path: 'register',
                name: 'register',
                component: () =>
                    import ( /* webpackChunkName: "user" */ '@/views/user/Register')
            },
            {
                path: 'register-result',
                name: 'registerResult',
                component: () =>
                    import ( /* webpackChunkName: "user" */ '@/views/user/RegisterResult')
            },
            {
                path: 'recover',
                name: 'recover',
                component: undefined
            }
        ]
    },

    {
        path: '/404',
        component: () =>
            import ( /* webpackChunkName: "fail" */ '@/views/exception/404')
    }

]